package me.work.pay.jsyl.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author xubo
 * @date 2018/9/17 16:56
 */
public class MerchantData implements Parcelable {

    /**
     * total : 0
     * is_radio : 1
     * is_team : 1
     * is_me : 1
     * is_scancode : 1
     * shopName : 既然结局
     * shopId : 399007096119750f6184fcb1cab9a5a6
     * number : 0
     * is_paidout : 1
     * is_activity : 1
     * cardName :
     */

    private double total;
    private int is_radio;
    private int is_team;
    private int is_me;
    private int is_scancode;
    private String shopName;
    private String shopId;
    private int number;
    private int is_paidout;
    private int is_activity;
    private String cardName = "";
    private String cardNo = "";
    private String logoUrl = "";
    public boolean selected;
    private String address ="";

    public void setAddress(String address) {
        this.address = address;
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    public String getLogoUrl() {
        return logoUrl;
    }

    public void setLogoUrl(String logoUrl) {
        this.logoUrl = logoUrl;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public double getTotal() {
        return total;
    }

    public void setTotal(double total) {
        this.total = total;
    }

    public int getIs_radio() {
        return is_radio;
    }

    public void setIs_radio(int is_radio) {
        this.is_radio = is_radio;
    }

    public int getIs_team() {
        return is_team;
    }

    public void setIs_team(int is_team) {
        this.is_team = is_team;
    }

    public int getIs_me() {
        return is_me;
    }

    public void setIs_me(int is_me) {
        this.is_me = is_me;
    }

    public int getIs_scancode() {
        return is_scancode;
    }

    public void setIs_scancode(int is_scancode) {
        this.is_scancode = is_scancode;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getIs_paidout() {
        return is_paidout;
    }

    public void setIs_paidout(int is_paidout) {
        this.is_paidout = is_paidout;
    }

    public int getIs_activity() {
        return is_activity;
    }

    public void setIs_activity(int is_activity) {
        this.is_activity = is_activity;
    }

    public String getCardName() {
        return cardName;
    }

    public void setCardName(String cardName) {
        this.cardName = cardName;
    }

    public MerchantData() {
    }

    public String getAddress() {
        return address;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeDouble(this.total);
        dest.writeInt(this.is_radio);
        dest.writeInt(this.is_team);
        dest.writeInt(this.is_me);
        dest.writeInt(this.is_scancode);
        dest.writeString(this.shopName);
        dest.writeString(this.shopId);
        dest.writeInt(this.number);
        dest.writeInt(this.is_paidout);
        dest.writeInt(this.is_activity);
        dest.writeString(this.cardName);
        dest.writeString(this.cardNo);
        dest.writeString(this.logoUrl);
        dest.writeByte(this.selected ? (byte) 1 : (byte) 0);
        dest.writeString(this.address);
    }

    protected MerchantData(Parcel in) {
        this.total = in.readDouble();
        this.is_radio = in.readInt();
        this.is_team = in.readInt();
        this.is_me = in.readInt();
        this.is_scancode = in.readInt();
        this.shopName = in.readString();
        this.shopId = in.readString();
        this.number = in.readInt();
        this.is_paidout = in.readInt();
        this.is_activity = in.readInt();
        this.cardName = in.readString();
        this.cardNo = in.readString();
        this.logoUrl = in.readString();
        this.selected = in.readByte() != 0;
        this.address = in.readString();
    }

    public static final Creator<MerchantData> CREATOR = new Creator<MerchantData>() {
        @Override
        public MerchantData createFromParcel(Parcel source) {
            return new MerchantData(source);
        }

        @Override
        public MerchantData[] newArray(int size) {
            return new MerchantData[size];
        }
    };
}
